package git.soulbgm.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 生产控制器
 *
 * @author SoulBGM
 * @date 2021/07/12
 */
@RestController
public class ProducerController {

    @Autowired
    private StringRedisTemplate redis;

    @GetMapping("put")
    public String put(String key, String value) {
        redis.convertAndSend(key, value);
        return "success";
    }

}
